home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / gnu / emacs.lha / emacs-19.16 / Makefile.in < prev    next >
Makefile  |  1993-07-06  |  22KB  |  541 lines

  1. # DIST: This is the distribution Makefile for Emacs.  configure can
  2. # DIST: make most of the changes to this file you might want, so try
  3. # DIST: that first.
  4.  
  5. # make all    to compile and build Emacs.
  6. # make install    to install it.
  7. # make TAGS    to update tags tables.
  8. #
  9. # make clean  or  make mostlyclean
  10. #      Delete all files from the current directory that are normally
  11. #      created by building the program.     Don't delete the files that
  12. #      record the configuration.  Also preserve files that could be made
  13. #      by building, but normally aren't because the distribution comes
  14. #      with them.
  15. #
  16. #      Delete `.dvi' files here if they are not part of the distribution.
  17. # make distclean
  18. #      Delete all files from the current directory that are created by
  19. #      configuring or building the program.  If you have unpacked the
  20. #      source and built the program without creating any other files,
  21. #      `make distclean' should leave only the files that were in the
  22. #      distribution.
  23. # make realclean
  24. #      Delete everything from the current directory that can be
  25. #      reconstructed with this Makefile.  This typically includes
  26. #      everything deleted by distclean, plus more: C source files
  27. #      produced by Bison, tags tables, info files, and so on.
  28. #
  29. # make extraclean
  30. #      Still more severe - delete backup and autosave files, too.
  31.  
  32. SHELL = /bin/sh
  33. MAKE = make  # BSD doesn't have it as a default.
  34.  
  35. # ==================== Things `configure' Might Edit ====================
  36.  
  37. CC=@CC@
  38. CPP=@CPP@
  39. C_SWITCH_SYSTEM=@c_switch_system@
  40. ALLOCA=@ALLOCA@
  41. LN_S=@LN_S@
  42. CFLAGS=@CFLAGS@
  43. C_SWITCH_X_SITE=@C_SWITCH_X_SITE@
  44. LD_SWITCH_X_SITE=@LD_SWITCH_X_SITE@
  45. YACC=@YACC@
  46.  
  47. ### These help us choose version- and architecture-specific directories
  48. ### to install files in.
  49.  
  50. ### This should be the number of the Emacs version we're building,
  51. ### like `18.59' or `19.0'.
  52. version=@version@
  53.  
  54. ### This should be the name of the configuration we're building Emacs
  55. ### for, like `mips-dec-ultrix' or `sparc-sun-sunos'.
  56. configuration=@configuration@
  57.  
  58. ### Libraries which should be edited into lib-src/Makefile.
  59. libsrc_libs=@libsrc_libs@
  60.  
  61. # ==================== Where To Install Things ====================
  62.  
  63. # The default location for installation.  Everything is placed in
  64. # subdirectories of this directory.  The default values for many of
  65. # the variables below are expressed in terms of this one, so you may
  66. # not need to change them.  This defaults to /usr/local.
  67. prefix=@prefix@
  68.  
  69. # Like `prefix', but used for architecture-specific files.
  70. exec_prefix=@exec_prefix@
  71.  
  72. # Where to install Emacs and other binaries that people will want to
  73. # run directly (like etags).
  74. bindir=${exec_prefix}/bin
  75.  
  76. # Where to install architecture-independent data files.     ${lispdir}
  77. # and ${etcdir} are subdirectories of this.
  78. datadir=${prefix}/lib
  79.  
  80. # Where to install and expect the files that Emacs modifies as it
  81. # runs.     These files are all architecture-independent. Right now, the
  82. # only such data is the locking directory; ${lockdir} is a
  83. # subdirectory of this.
  84. statedir=${prefix}/lib
  85.  
  86. # Where to install and expect executable files to be run by Emacs
  87. # rather than directly by users, and other architecture-dependent
  88. # data.     ${archlibdir} is a subdirectory of this.
  89. libdir=${exec_prefix}/lib
  90.  
  91. # Where to install Emacs's man pages, and what extension they should have.
  92. mandir=${prefix}/man/man1
  93. manext=.1
  94.  
  95. # Where to install and expect the info files describing Emacs.    In the
  96. # past, this defaulted to a subdirectory of ${prefix}/lib/emacs, but
  97. # since there are now many packages documented with the texinfo
  98. # system, it is inappropriate to imply that it is part of Emacs.
  99. infodir=${prefix}/info
  100.  
  101. # Where to find the source code.  The source code for Emacs's C kernel is
  102. # expected to be in ${srcdir}/src, and the source code for Emacs's
  103. # utility programs is expected to be in ${srcdir}/lib-src.  This is
  104. # set by the configure script's `--srcdir' option.
  105. srcdir=@srcdir@
  106.  
  107. # ==================== Emacs-specific directories ====================
  108.  
  109. # These variables hold the values Emacs will actually use.  They are
  110. # based on the values of the standard Make variables above.
  111.  
  112. @inst_paths@# Where to install the lisp files distributed with
  113. @inst_paths@# Emacs.  This includes the Emacs version, so that the
  114. @inst_paths@# lisp files for different versions of Emacs will install
  115. @inst_paths@# themselves in separate directories.
  116. @inst_paths@lispdir=${datadir}/emacs/${version}/lisp
  117.  
  118. @inst_paths@# Directories Emacs should search for lisp files specific
  119. @inst_paths@# to this site (i.e. customizations), before consulting
  120. @inst_paths@# ${lispdir}.  This should be a colon-separated list of
  121. @inst_paths@# directories.
  122. @inst_paths@locallisppath=${datadir}/emacs/site-lisp
  123.  
  124. # Where Emacs will search to find its lisp files.  Before
  125. # changing this, check to see if your purpose wouldn't
  126. # better be served by changing locallisppath.  This
  127. # should be a colon-separated list of directories.
  128. lisppath=${locallisppath}:${lispdir}
  129.  
  130. # Where Emacs will search for its lisp files while
  131. # building.  This is only used during the process of
  132. # compiling Emacs, to help Emacs find its lisp files
  133. # before they've been installed in their final location.
  134. # It's usually identical to lisppath, except that the
  135. # entry for the directory containing the installed lisp
  136. # files has been replaced with ../lisp.  This should be a
  137. # colon-separated list of directories.
  138. buildlisppath=${srcdir}/lisp
  139.  
  140. @inst_paths@# Where to install the other architecture-independent
  141. @inst_paths@# data files distributed with Emacs (like the tutorial,
  142. @inst_paths@# the cookie recipes and the Zippy database). This path
  143. @inst_paths@# usually contains the Emacs version number, so the data
  144. @inst_paths@# files for multiple versions of Emacs may be installed
  145. @inst_paths@# at once.
  146. @inst_paths@etcdir=${datadir}/emacs/${version}/etc
  147.  
  148. @inst_paths@# Where to create and expect the locking directory, where
  149. @inst_paths@# the Emacs locking code keeps track of which files are
  150. @inst_paths@# currently being edited.
  151. @inst_paths@lockdir=${statedir}/emacs/lock
  152.  
  153. @inst_paths@# Where to put executables to be run by Emacs rather than
  154. @inst_paths@# the user.  This path usually includes the Emacs version
  155. @inst_paths@# and configuration name, so that multiple configurations
  156. @inst_paths@# for multiple versions of Emacs may be installed at
  157. @inst_paths@# once.
  158. @inst_paths@archlibdir=${libdir}/emacs/${version}/${configuration}
  159.  
  160. # ====================== Developer's configuration =======================
  161.  
  162. # The following assignments make sense if you're running Emacs on a single
  163. # machine, one version at a time, and  you want changes to the lisp and etc
  164. # directories in the source tree to show up immediately in your working
  165. # environment.  It saves a great deal of disk space by not duplicating the
  166. # lisp and etc directories.
  167.  
  168. @rip_paths@lispdir=${srcdir}/lisp
  169. @rip_paths@externallispdir=${srcdir}/externallisp
  170. @rip_paths@locallisppath=${srcdir}/site-lisp:${datadir}/emacs/site-lisp
  171. @rip_paths@etcdir=${srcdir}/etc
  172. @rip_paths@lockdir=${srcdir}/lock
  173. @rip_paths@archlibdir=${srcdir}/lib-src
  174. @rip_paths@infodir=${srcdir}/info
  175.  
  176. # ==================== Utility Programs for the Build ====================
  177.  
  178. # Allow the user to specify the install program.
  179. INSTALL = @INSTALL@
  180. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  181. INSTALL_DATA = @INSTALL_DATA@
  182.  
  183. # ============================= Targets ==============================
  184.  
  185. # Flags passed down to subdirectory makefiles.
  186. MFLAGS = 
  187.  
  188. # Subdirectories to make recursively.  `lisp' is not included
  189. # because the compiled lisp files are part of the distribution
  190. # and you cannot remake them without installing Emacs first.
  191. SUBDIR = lib-src src
  192.  
  193. # The makefiles of the directories in $SUBDIR.
  194. SUBDIR_MAKEFILES = lib-src/Makefile src/Makefile oldXMenu/Makefile
  195.  
  196. # Subdirectories to install, and where they'll go.
  197. # lib-src's makefile knows how to install it, so we don't do that here.
  198. # When installing the info files, we need to do special things to
  199. # avoid nuking an existing dir file, so we don't do that here;
  200. # instead, we have written out explicit code in the `install' targets.
  201. COPYDIR = ${srcdir}/etc ${srcdir}/lisp
  202. COPYDESTS = ${etcdir} ${lispdir}
  203.  
  204. all:    src/paths.h ${SUBDIR}
  205.  
  206. removenullpaths=sed -e 's/^://' -e 's/:$$//' -e 's/::/:/'
  207.  
  208. # We force the rebuilding of src/paths.h because the user might give
  209. # make different values for the various directories.  Since we use
  210. # move-if-change, src/paths.h only actually changes if the user did
  211. # something notable, so the only unnecessary work we do is in building
  212. # src/paths.h.tmp, which isn't much.
  213. # Note that sed is not in /bin on 386bsd.
  214. src/paths.h: Makefile ${srcdir}/src/paths.h.in FRC.src.paths.h
  215.     @echo "Producing \`src/paths.h' from \`src/paths.h.in'."
  216.     @(lisppath=`echo ${lisppath} | ${removenullpaths}` ;        \
  217.       buildlisppath=`echo ${buildlisppath} | ${removenullpaths}` ;    \
  218.       sed < ${srcdir}/src/paths.h.in > src/paths.h.tmp        \
  219.       -e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "'$${lisppath}'";'    \
  220.       -e 's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "'$${buildlisppath}'";' \
  221.       -e 's;\(#.*PATH_EXEC\).*$$;\1 "${archlibdir}";'        \
  222.       -e 's;\(#.*PATH_INFO\).*$$;\1 "${infodir}";'            \
  223.       -e 's;\(#.*PATH_DATA\).*$$;\1 "${etcdir}";'            \
  224.       -e 's;\(#.*PATH_LOCK\).*$$;\1 "${lockdir}/";')
  225.     @${srcdir}/move-if-change src/paths.h.tmp src/paths.h
  226.  
  227. src:    lib-src FRC.src
  228. lib-src: FRC.lib-src
  229.  
  230. .RECURSIVE: ${SUBDIR}
  231.  
  232. ${SUBDIR}: ${SUBDIR_MAKEFILES} FRC
  233.     cd $@; $(MAKE) all ${MFLAGS} \
  234.         CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \
  235.         prefix='${prefix}' srcdir='${srcdir}/$@' libdir='${libdir}'
  236.  
  237. ## We build the makefiles for the subdirectories here so that we can
  238. ## edit the values for the path variables into them.  This means that
  239. ## when the user has built them from this makefile once, they will use
  240. ## the right default values for the path variables.
  241. lib-src/Makefile: ${srcdir}/lib-src/Makefile.in Makefile
  242.     rm -f lib-src/Makefile.tmp
  243.     @echo "Producing \`lib-src/Makefile' from \`${srcdir}/lib-src/Makefile.in'."
  244.     @(echo "# This file is generated from \`${srcdir}/lib-src/Makefile.in'." ; \
  245.       echo "# If you are thinking about editing it, you should seriously consider" ; \
  246.       echo "# running \`make lib-src/Makefile' at the top of the" ;    \
  247.       echo "# Emacs build tree instead, or editing" ;        \
  248.       echo "# \`${srcdir}/lib-src/Makefile.in' itself." ;        \
  249.       sed < ${srcdir}/lib-src/Makefile.in                \
  250.       -e 's|^\(version *=\).*$$|\1'"${version}"'|'            \
  251.       -e 's|^\(configname *=\).*$$|\1'"${configuration}"'|'        \
  252.       -e 's|^\(prefix *=\).*$$|\1'"${prefix}"'|'            \
  253.       -e 's|^\(exec_prefix *=\).*$$|\1'"${exec_prefix}"'|'        \
  254.       -e 's|^\(libdir *=\).*$$|\1'"${libdir}"'|'            \
  255.       -e 's|^\(srcdir *=\).*$$|\1'"${srcdir}"'/lib-src|'        \
  256.       -e 's|^\(VPATH *=\).*$$|\1'"${srcdir}"'/lib-src|'        \
  257.       -e 's|^\(archlibdir *=\).*$$|\1'"${archlibdir}"'|'        \
  258.       -e 's|^\(ALLOCA *=\).*$$|\1'"${ALLOCA}"'|'            \
  259.       -e 's|^\(YACC *=\).*$$|\1'"${YACC}"'|'            \
  260.       -e 's|^CC *=.*$$|CC='"${CC}"'|'                \
  261.       -e 's|^CFLAGS *=.*$$|CFLAGS='"${CFLAGS}"'|' \
  262.       -e 's|^C_SWITCH_SYSTEM *=.*$$|C_SWITCH_SYSTEM='"${C_SWITCH_SYSTEM}"'|' \
  263.       -e 's|^LOADLIBES *=.*$$|LOADLIBES='"${libsrc_libs}"'|'    \
  264.       -e '/^# DIST: /d') > lib-src/Makefile.tmp
  265.     @${srcdir}/move-if-change lib-src/Makefile.tmp lib-src/Makefile
  266.     chmod -w lib-src/Makefile
  267.  
  268. src/Makefile: ${srcdir}/src/Makefile.in Makefile
  269.     rm -f src/Makefile.tmp
  270.     @echo "Producing \`src/Makefile' from \`${srcdir}/src/Makefile.in'."
  271.     @(echo "# This file is generated from \`${srcdir}/src/Makefile.in'." ; \
  272.       echo "# If you are thinking about editing it, you should seriously consider" ; \
  273.       echo "# running \`make src/Makefile' at the top of the" ;    \
  274.       echo "# Emacs build tree instead, or editing" ;        \
  275.       echo "# \`${srcdir}/src/Makefile.in' itself." ;        \
  276.       sed < ${srcdir}/src/Makefile.in                \
  277.       -e 's|^\(srcdir *=\).*$$|\1${srcdir}/src|'            \
  278.       -e 's|^\(VPATH *=\).*$$|\1${srcdir}/src|'            \
  279.       -e 's|^CC *=.*$$|CC=${CC}|'                    \
  280.       -e 's|^CPP *=.*$$|CPP=${CPP}|'                \
  281.       -e 's|^LN_S *=.*$$|LN_S=${LN_S}|'                \
  282.       -e 's|^CFLAGS *=.*$$|CFLAGS=${CFLAGS}|'             \
  283.       -e 's|^\(LD_SWITCH_X_SITE *=\).*$$|\1${LD_SWITCH_X_SITE}|'    \
  284.       -e '/^# DIST: /d') > src/Makefile.tmp
  285.     @${srcdir}/move-if-change src/Makefile.tmp src/Makefile
  286.     chmod -w src/Makefile
  287.  
  288. oldXMenu/Makefile: ${srcdir}/oldXMenu/Makefile.in Makefile
  289.     rm -f oldXMenu/Makefile.tmp
  290.     @echo "Producing \`oldXMenu/Makefile' from \`${srcdir}/oldXMenu/Makefile.in'."
  291.     @(echo "# This file is generated from \`${srcdir}/oldXMenu/Makefile.in'." ; \
  292.       echo "# If you are thinking about editing it, you should seriously consider" ; \
  293.       echo "# running \`make oldXMenu/Makefile' at the top of the" ; \
  294.       echo "# Emacs build tree instead, or editing" ;        \
  295.       echo "# \`${srcdir}/oldXMenu/Makefile.in' itself." ;        \
  296.       sed < ${srcdir}/oldXMenu/Makefile.in                \
  297.       -e 's|^\(srcdir *=\).*$$|\1'"${srcdir}"'/oldXMenu|'        \
  298.       -e 's|^\(VPATH *=\).*$$|\1'"${srcdir}"'/oldXMenu|'        \
  299.       -e 's|^\(C_SWITCH_X_SITE *=\).*$$|\1'"${C_SWITCH_X_SITE}"'|'    \
  300.       -e 's|^CC *=.*$$|CC='"${CC}"'|'                \
  301.       -e 's|^DEFS *=.*$$|DEFS='"${DEFS}"'|' \
  302.       -e '/^# DIST: /d') > oldXMenu/Makefile.tmp
  303.     @${srcdir}/move-if-change oldXMenu/Makefile.tmp oldXMenu/Makefile
  304.     chmod -w oldXMenu/Makefile
  305.  
  306. Makefile:
  307.     ./config.status
  308.  
  309. # ==================== Installation ====================
  310.  
  311. ## If we let lib-src do its own installation, that means we
  312. ## don't have to duplicate the list of utilities to install in
  313. ## this Makefile as well.
  314.  
  315. ## On AIX, use tar xBf.
  316. ## On Xenix, use tar xpf.
  317.  
  318. ## We delete each directory in ${COPYDESTS} before we copy into it;
  319. ## that way, we can reinstall over directories that have been put in
  320. ## place with their files read-only (perhaps because they are checked
  321. ## into RCS).  In order to make this safe, we make sure that the
  322. ## source exists and is distinct from the destination.
  323. install: all do-install
  324.  
  325. ### Note that we copy the DOC-* files from the build etc directory
  326. ### as well as lots of things from ${srcdir}/etc.
  327. do-install: mkdir
  328.     (cd lib-src; \
  329.       $(MAKE) install ${MFLAGS} prefix=${prefix} \
  330.         exec_prefix=${exec_prefix} bindir=${bindir} libdir=${libdir} \
  331.         archlibdir=${archlibdir})
  332.     -set ${COPYDESTS} ; \
  333.      for dir in ${COPYDIR} ; do \
  334.        if [ `(cd $$1 && pwd)` != `(cd $${dir} && pwd)` ] ; then \
  335.          rm -rf $$1 ; \
  336.        fi ; \
  337.        shift ; \
  338.      done
  339.     -set ${COPYDESTS} ; \
  340.      mkdir ${COPYDESTS} ; \
  341.      for dir in ${COPYDIR} ; do \
  342.        dest=$$1 ; shift ; \
  343.        [ -d $${dir} ] \
  344.        && [ `(cd $${dir} && /bin/pwd)` != `(cd $${dest} && /bin/pwd)` ] \
  345.        && (echo "Copying $${dir}..." ; \
  346.            (cd $${dir}; tar -cf - . )|(cd $${dest};umask 0; tar -xvf - ); \
  347.            for subdir in `find $${dest} -type d ! -name RCS -print` ; do \
  348.          rm -rf $${subdir}/RCS ; \
  349.          rm -rf $${subdir}/CVS ; \
  350.          rm -f  $${subdir}/\#* ; \
  351.          rm -f  $${subdir}/*~ ; \
  352.            done) ; \
  353.      done
  354.     if [ `(cd ./etc; /bin/pwd)` != `(cd ${srcdir}/etc; /bin/pwd)` ]; \
  355.     then \
  356.        echo "Copying etc/DOC* ..." ; \
  357.        (cd etc; tar -cf - DOC*)|(cd ${etcdir}; umask 0; tar -xvf - ); \
  358.     else true; fi
  359.     if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd ${infodir} && /bin/pwd)` ]; \
  360.     then (cd ${srcdir}/info ; \
  361.          if [ ! -f ${infodir}/dir ] && [ -f dir ]; then \
  362.            ${INSTALL_DATA} dir ${infodir}/dir ; \
  363.          fi ; \
  364.          for f in cl* emacs* forms* info* vip* ; do \
  365.            ${INSTALL_DATA} $$f ${infodir}/$$f ; \
  366.          done); \
  367.     else true; fi
  368.     cd ${srcdir}/etc; for page in emacs etags ctags ; do \
  369.       ${INSTALL_DATA} $${page}.1 ${mandir}/$${page}${manext} ; \
  370.     done
  371.     ${INSTALL_PROGRAM} src/emacs ${bindir}/emacs-${version}
  372.     chmod 1755  ${bindir}/emacs-${version}
  373.     rm -f ${bindir}/emacs
  374.     ln ${bindir}/emacs-${version} ${bindir}/emacs
  375.  
  376. ### Build all the directories we're going to install Emacs in.    Since
  377. ### we may be creating several layers of directories (for example,
  378. ### /usr/local/lib/emacs/19.0/mips-dec-ultrix4.2), we use make-path
  379. ### instead of mkdir.  Not all systems' mkdirs have the `-p' flag.
  380. mkdir: FRC.mkdir
  381.     ./lib-src/make-path ${COPYDESTS} ${lockdir} ${infodir} ${mandir} \
  382.       ${bindir} ${datadir} ${libdir} \
  383.       `echo ${locallisppath} | sed 's/:/ /'`
  384.     chmod 777 ${COPYDESTS} ${lockdir}
  385.  
  386. ### Delete all the installed files that the `install' target would
  387. ### create (but not the noninstalled files such as `make all' would
  388. ### create).
  389. ###
  390. ### Don't delete the lisp and etc directories if they're in the source tree.
  391. uninstall:
  392.     (cd lib-src;                     \
  393.      $(MAKE) ${MFLAGS} uninstall            \
  394.         prefix=${prefix} exec_prefix=${exec_prefix}    \
  395.         bindir=${bindir} libdir=${libdir} archlibdir=${archlibdir})
  396.     for dir in ${lispdir} ${etcdir} ; do         \
  397.       case `(cd $${dir} ; pwd)` in            \
  398.         `(cd ${srcdir} ; pwd)`* ) ;;        \
  399.         * ) rm -rf $${dir} ;;            \
  400.       esac ;                    \
  401.       case $${dir} in                \
  402.         ${datadir}/emacs/${version}/* )        \
  403.           rm -rf ${datadir}/emacs/${version}    \
  404.         ;;                        \
  405.       esac ;                    \
  406.     done
  407.     (cd ${infodir}; rm -f cl* emacs* forms* info* vip*)
  408.     (cd ${mandir};  rm -f emacs.1 etags.1 ctags.1)
  409.     (cd ${bindir};  rm -f emacs-${version} emacs)
  410.  
  411.  
  412. ### Some makes seem to remember that they've built something called FRC,
  413. ### so you can only use a given FRC once per makefile.
  414. FRC FRC.src.paths.h FRC.src FRC.lib-src FRC.mkdir:
  415. FRC.mostlyclean FRC.clean FRC.distclean FRC.realclean:
  416.  
  417. # ==================== Cleaning up and miscellanea ====================
  418.  
  419. ### `mostlyclean'
  420. ###      Like `clean', but may refrain from deleting a few files that people
  421. ###      normally don't want to recompile.  For example, the `mostlyclean'
  422. ###      target for GCC does not delete `libgcc.a', because recompiling it
  423. ###      is rarely necessary and takes a lot of time.
  424. mostlyclean: FRC.mostlyclean
  425.     (cd src;      make ${MFLAGS} mostlyclean)
  426.     (cd oldXMenu; make ${MFLAGS} mostlyclean)
  427.     (cd lib-src;  make ${MFLAGS} mostlyclean)
  428.     (cd man;      make ${MFLAGS} mostlyclean)
  429.  
  430. ### `clean'
  431. ###      Delete all files from the current directory that are normally
  432. ###      created by building the program.  Don't delete the files that
  433. ###      record the configuration.  Also preserve files that could be made
  434. ###      by building, but normally aren't because the distribution comes
  435. ###      with them.
  436. ### 
  437. ###      Delete `.dvi' files here if they are not part of the distribution.
  438. clean: FRC.clean
  439.     (cd src;      make ${MFLAGS} clean)
  440.     (cd oldXMenu; make ${MFLAGS} clean)
  441.     (cd lib-src;  make ${MFLAGS} clean)
  442.     (cd man;      make ${MFLAGS} clean)
  443.  
  444. ### `distclean'
  445. ###      Delete all files from the current directory that are created by
  446. ###      configuring or building the program.  If you have unpacked the
  447. ###      source and built the program without creating any other files,
  448. ###      `make distclean' should leave only the files that were in the
  449. ###      distribution.
  450. top_distclean=\
  451.     rm -f config.status build-install ; \
  452.     rm -f Makefile ${SUBDIR_MAKEFILES} ; \
  453.     (cd lock ; rm -f *)
  454. distclean: FRC.distclean
  455.     (cd src;      make ${MFLAGS} distclean)
  456.     (cd oldXMenu; make ${MFLAGS} distclean)
  457.     (cd lib-src;  make ${MFLAGS} distclean)
  458.     (cd man;      make ${MFLAGS} distclean)
  459.     ${top_distclean}
  460.     
  461.  
  462. ### `realclean'
  463. ###      Delete everything from the current directory that can be
  464. ###      reconstructed with this Makefile.  This typically includes
  465. ###      everything deleted by distclean, plus more: C source files
  466. ###      produced by Bison, tags tables, info files, and so on.
  467. ### 
  468. ###      One exception, however: `make realclean' should not delete
  469. ###      `configure' even if `configure' can be remade using a rule in the
  470. ###      Makefile.  More generally, `make realclean' should not delete
  471. ###      anything that needs to exist in order to run `configure' and then
  472. ###      begin to build the program.
  473. realclean: FRC.realclean
  474.     (cd src;      make ${MFLAGS} realclean)
  475.     (cd oldXMenu; make ${MFLAGS} realclean)
  476.     (cd lib-src;  make ${MFLAGS} realclean)
  477.     (cd man;      make ${MFLAGS} realclean)
  478.     ${top_distclean}
  479.  
  480. ### This doesn't actually appear in the coding standards, but Karl
  481. ### says GCC supports it, and that's where the configuration part of
  482. ### the coding standards seem to come from.  It's like distclean, but
  483. ### it deletes backup and autosave files too.
  484. extraclean:
  485.     for i in ${SUBDIR}; do (cd $$i; $(MAKE) ${MFLAGS} extraclean); done
  486.     -(cd lock; rm *)
  487.     -rm config.status config-tmp-*
  488.     -rm -f *~ \#*
  489.  
  490. ### Unlocking and relocking.  The idea of these productions is to reduce
  491. ### hassles when installing an incremental tar of Emacs.  Do `make unlock'
  492. ### before unlocking the file to take the write locks off all sources so
  493. ### that tar xvof will overwrite them without fuss.  Then do `make relock'
  494. ### afterward so that VC mode will know which files should be checked in
  495. ### if you want to mung them.
  496. ###
  497. ### Note: it's no disaster if these productions miss a file or two; tar
  498. ### and VC will swiftly let you know if this happens, and it is easily
  499. ### corrected.
  500. SOURCES = ChangeLog GETTING.GNU.SOFTWARE INSTALL Makefile.in PROBLEMS \
  501.     README build-install.in configure make-dist move-if-change
  502.  
  503. unlock:
  504.     chmod u+w $(SOURCES) cpp/*
  505.     -(cd elisp; chmod u+w Makefile README *.texi)
  506.     (cd etc; make unlock)
  507.     (cd lib-src; make unlock)
  508.     (cd lisp; make unlock)
  509.     (cd lisp/term; chmod u+w README *.el)
  510.     (cd man; chmod u+w *texi* ChangeLog split-man)
  511.     (cd oldXMenu; chmod u+w *.[ch] Makefile README)
  512.     (cd src; make unlock)
  513.  
  514. relock:
  515.     chmod u-w $(SOURCES) cpp/*
  516.     -(cd elisp; chmod u-w Makefile README *.texi)
  517.     (cd etc; make relock)
  518.     (cd lib-src; make relock)
  519.     (cd lisp; make relock)
  520.     (cd lisp/term; chmod u+w README *.el)
  521.     (cd man; chmod u+w *texi* ChangeLog split-man)
  522.     (cd oldXMenu; chmod u+w *.[ch] Makefile README)
  523.     (cd src; make relock)
  524.  
  525. TAGS tags:    lib-src
  526.     (cd ${srcdir}/src; \
  527.      ../lib-src/etags *.[ch] ../lisp/*.el ../lisp/term/*.el)
  528.  
  529. check:
  530.     @echo "We don't have any tests for GNU Emacs yet."
  531.  
  532. dist:
  533.     cd ${srcdir}; make-dist
  534.  
  535. info:
  536.     (cd ${srcdir}/man; make ${MFLAGS} info)
  537. dvi:
  538.     (cd ${srcdir}/man; make ${MFLAGS} dvi)
  539.